home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / gnu / amiga / bmake15.lzh / Makefile < prev    next >
Makefile  |  1991-10-30  |  2KB  |  61 lines

  1. #    Makefile for Make
  2. #    (c) Copyright 1991 by Ben Eng, All Rights Reserved
  3. #
  4. #    LIST of OPTIONS
  5. #    -DMAXLINE=1024 sets the maximum line length to 1024
  6. #    -DMAXSUFFIX=16 sets the maximum suffix length to 16
  7. #    -DMAXPATHNAME=108 sets the maximum length of a path name to 108
  8. #    -DMAX_MACRONAME=512    to override internal default of 256
  9. #    -DFNCALLS=0 to disable function calls
  10. #    -DDEBUG=0 to disable the debugging features
  11. #    -gs enables dynamic stack growth
  12. #    -s enables symbolic information
  13. #    MiniMake OPTIONS := -DDEBUG=0 -DFNCALLS=0
  14. #    BigMake  OPTIONS :=
  15. #    CC := dcc
  16. OPTIONS :=
  17. OBJDIR := vd0:obj/
  18. CFLAGS := -r -ms -proto $(OPTIONS)
  19. LIBS := -lben
  20.  
  21. CNOBJS := $(addprefix $(OBJDIR),cond.o input.o read.o recipe.o)
  22. DHOBJS := $(addprefix $(OBJDIR),depend.o  dumprules.o make.o \
  23.     builtin.o macro.o expand.o fncall.o pattern.o) $(CNOBJS)
  24. OBJS := $(addprefix $(OBJDIR),lists.o snode.o param.o touch.o log.o \
  25.     parsing.o) $(DHOBJS)
  26. BMAIN := $(OBJDIR)main.o
  27. GMAIN := $(OBJDIR)guimain.o
  28. GUIOBJS := $(OBJDIR)guicode.o
  29. BVERS := $(OBJDIR)bversion.o
  30. GVERS := $(OBJDIR)gversion.o
  31.  
  32. all: bmake
  33.     if exists(make.log)
  34.         -delete make.log
  35.     endif
  36.  
  37. .PHONY: all
  38.  
  39. bmake: $(BVERS)
  40.     $(CC) $(CFLAGS) -o $@ $(BVERS) $(BMAIN) $(OBJS) $(LIBS)
  41.  
  42. guimake: $(GVERS)
  43.     $(CC) $(CFLAGS) -o $@ $(GVERS) $(GMAIN) $(GUIOBJS) $(OBJS) $(LIBS)
  44.  
  45. $(BVERS): $(BMAIN) $(OBJS)
  46. $(GVERS): $(GMAIN) $(GUIOBJS) $(OBJS)
  47. $(BMAIN) $(GMAIN) $(OBJS): make.h
  48. $(BMAIN) $(GMAIN) $(DHOBJS): depend.h
  49. $(CNOBJS): cond.h
  50.  
  51. clean:
  52.     -delete $(OBJS) $(VERS)
  53.  
  54. install:
  55.     copy bmake sys:bin/make
  56.  
  57. #    pattern rule to handle object files in a different directory
  58. #    than the source files
  59. $(OBJDIR)%.o: %.c
  60.     $(CC) -c $(CFLAGS) -o $@ $<
  61.